<!--
  * 首页
  *
  * @Author:    1024创新实验室-主任：卓大
  * @Date:      2022-09-12 22:34:00
  * @Wechat:    zhuda1024
  * @Email:     lab1024@163.com
  * @Copyright  1024创新实验室 （ https://1024lab.net ），Since 2012
  *
-->
<template>
  <!--  顶部用户信息-->
  <!-- <a-row>
    <HomeHeader />
  </a-row> -->
  <!--下方左右布局-->
  <h2 style="text-align: center;margin-top: 200px;">2025年上海市崇明区城桥中学招收艺体特长生报名</h2>
  <div v-if="false">
    <a-row :gutter="[10, 10]">
      <!--左侧-->
      <a-col :span="16">
        <a-row :gutter="[10, 10]">1
          <!--公告信息-->
          <a-col :span="12">
            <HomeNotice title="公告" :noticeTypeId="1" />
          </a-col>
          <!--企业动态-->
          <a-col :span="12">
            <HomeNotice title="通知" :noticeTypeId="2" />
          </a-col>
          <!--各类报表-->
          <!-- <a-col :span="6">
          <Gauge :percent="saleTargetPercent" />
        </a-col> -->
          <a-col :span="12">
            <Pie />
          </a-col>
          <a-col :span="12">
            <Category />
          </a-col>
          <a-col :span="24">
            <Gradient />
          </a-col>
        </a-row>
      </a-col>
      <!--右侧-->
      <a-col :span="8">
        <a-row :gutter="[10, 10]">
          <!--快捷入口-->
          <!-- <a-col :span="24">
          <HomeQuickEntry />
        </a-col> -->
          <!--关注公众号-->
          <a-col :span="24">
            <OfficialAccountCard />
          </a-col>
          <!--待办、已办-->
          <a-col :span="24">
            <ToBeDoneCard />
          </a-col>
          <!--更新日志-->
          <a-col :span="24">
            <ChangelogCard />
          </a-col>
        </a-row>
      </a-col>
    </a-row>
  </div>
  
    <!-- <a-descriptions title="我的报名">
      <a-descriptions-item v-for="(item, index) in columns" :span="item.span ? item.span : 1" :label="item.title">
        <span v-if="item.dataIndex === 'isPass'">
          <a-tag v-if="item.value === 2" color="red">{{ ['待审核', '通过', '未通过'][item.value] }}</a-tag>
          <a-tag v-if="item.value === 0" color="orange">{{ ['待审核', '通过', '未通过'][item.value] }}</a-tag>
          <a-tag v-if="item.value === 1" color="green">{{ ['待审核', '通过', '未通过'][item.value] }}</a-tag>
        </span>
        <span v-else-if="item.dataIndex === 'gender'">{{ ['男', '女'][item.value - 1] }}</span>
        <span v-else-if="item.dataIndex === 'ethnicGroupId'">{{ ethnicGroupList[item.value - 1] }}</span>
        <span v-else-if="item.dataIndex === 'registerType'">{{ registerTypeList[item.value-1] }}</span>
        <span v-else>{{ item.value }}</span>

      </a-descriptions-item>

    </a-descriptions> -->

    <!-- <DetailForm ref="detailFormRef"></DetailForm> -->
</template>
<script setup>
import { ref, computed, onMounted } from 'vue';
import HomeHeader from './home-header.vue';
import HomeNotice from './home-notice.vue';
import OfficialAccountCard from './components/official-account-card.vue';
import ToBeDoneCard from './components/to-be-done-card/home-to-be-done.vue';
import ChangelogCard from './components/changelog-card.vue';
import Category from './components/echarts/category.vue';
import Pie from './components/echarts/pie.vue';
import Gradient from './components/echarts/gradient.vue';
import { registrationReviewApi } from '/@/api/registrationReview/index';
import { useUserStore } from '/@/store/modules/system/user';
import { loginApi } from '/@/api/system/login-api';
import DetailForm from './components/detailForm.vue'

const detailFormRef = ref(null)
// 业绩完成百分比
const saleTargetPercent = computed(() => {
  return 75;
});
// 政治面貌
const politicalList = [
  '中共党员',
  '中共预备党员',
  '共青团员',
  '群众',
  '其他政治面貌'
];
// 婚姻状况
const maritalList = [
  '未婚',
  '已婚',
  '离异',
  '丧偶',
];
const visible = ref(false)
const columns = ref([
  {
    title: '姓名',
    dataIndex: 'actualName',
    value: ''
  },
  {
    title: '性别',
    dataIndex: 'gender',
    value: ''
  },
  {
    title: '手机号码',
    dataIndex: 'phone',
    value: ''
  },
  {
    title: '邮箱',
    dataIndex: 'email',
    value: ''
  },
  {
    title: '出生年月',
    dataIndex: 'birthday',
    value: ''
  },
  {
    title: '通讯地址',
    dataIndex: 'mailAddress',
    value: ''
  },
  {
    title: '邮政编码',
    value: '',
    dataIndex: 'postalCode',
  },
  {
    title: '户籍所在地',
    value: '',
    dataIndex: 'houseLocation',
  },
  {
    title: '政治面貌',
    dataIndex: 'political',
    value: ''
  },
  {
    title: '婚姻状况',
    dataIndex: 'marital',
    value: ''
  },
  {
    title: '民族',
    dataIndex: 'ethnicGroupId',
    value: ''
  },
  {
    title: '报名序号',
    dataIndex: 'registerNum',
    value: ''
  },
  {
    title: '报名学校类别',
    dataIndex: 'registerType',
    value: ''
  },
  // {
  //     title: '审核状态',
  //     dataIndex: 'isPass',
  //     value:'',
  //     span:3
  // },
]);
async function get() {
  // let responseModel = await registrationReviewApi.queryPage({
  //   employeeId: useUserStore().employeeId,
  //   registerschool: '',
  //   isPass: null,
  //   pageNum: 1,
  //   pageSize: 10,
  //   searchCount: true,
  // });
  // if (responseModel.data.list && responseModel.data.list.length) {
  //   let obj = responseModel.data.list[0];
  //   columns.value.forEach(element => {
  //     if (obj[element.dataIndex]) {
  //       element.value = obj[element.dataIndex];
  //     }
  //   });
  //   visible.value = true;
  // }
  // detailFormRef.value.showModal();
  
}
const ethnicGroupList = ref([]);
const registerTypeList = ref([]);
onMounted(async () => {
  get();
  const res = await loginApi.ethnicGroupSelect();
  if (res.data && res.data.data && res.data.data) {
    ethnicGroupList.value = res.data.data.map(i => {
      return i.ethnicGroupName
    });
  }


  // const registerType = await loginApi.schoolType();
  // if (registerType.data && registerType.data.rows && registerType.data.rows.length) {
  //   registerTypeList.value = registerType.data.rows.map(i => {
  //     return i.MC
  //   });
  // }




});
</script>
<style lang="less" scoped>
@import './index.less';
</style>
